<?php


/*
* Copyright (c) 2008-2016 vip.com, All Rights Reserved.
*
* Powered by com.vip.osp.osp-idlc-2.5.11.
*
*/

namespace com\vip\wpc\ospservice\vop;

class WpcVopOrderGoodsVo {
	
	static $_TSPEC;
	public $goodFullId = null;
	public $sizeId = null;
	public $sizeNum = null;
	public $price = null;
	public $exActSubtotal = null;
	public $exCouponSubTotal = null;
	public $goodsName = null;
	public $sizeCommissionTotal = null;
	public $commissionStatus = null;
	public $sellPrice = null;
	public $taxCode = null;
	public $taxRate = null;
	public $sizeRefundCommissionTotal = null;
	public $sizeRefundCommissionTime = null;
	public $sizeRewardTotalMoney = null;
	public $sizeName = null;
	public $color = null;
	
	public function __construct($vals=null){
		
		if (!isset(self::$_TSPEC)){
			
			self::$_TSPEC = array(
			12001 => array(
			'var' => 'goodFullId'
			),
			12002 => array(
			'var' => 'sizeId'
			),
			12003 => array(
			'var' => 'sizeNum'
			),
			12004 => array(
			'var' => 'price'
			),
			12005 => array(
			'var' => 'exActSubtotal'
			),
			12006 => array(
			'var' => 'exCouponSubTotal'
			),
			12007 => array(
			'var' => 'goodsName'
			),
			12008 => array(
			'var' => 'sizeCommissionTotal'
			),
			12009 => array(
			'var' => 'commissionStatus'
			),
			12010 => array(
			'var' => 'sellPrice'
			),
			12011 => array(
			'var' => 'taxCode'
			),
			12012 => array(
			'var' => 'taxRate'
			),
			12013 => array(
			'var' => 'sizeRefundCommissionTotal'
			),
			12014 => array(
			'var' => 'sizeRefundCommissionTime'
			),
			12015 => array(
			'var' => 'sizeRewardTotalMoney'
			),
			12016 => array(
			'var' => 'sizeName'
			),
			12017 => array(
			'var' => 'color'
			),
			
			);
			
		}
		
		if (is_array($vals)){
			
			
			if (isset($vals['goodFullId'])){
				
				$this->goodFullId = $vals['goodFullId'];
			}
			
			
			if (isset($vals['sizeId'])){
				
				$this->sizeId = $vals['sizeId'];
			}
			
			
			if (isset($vals['sizeNum'])){
				
				$this->sizeNum = $vals['sizeNum'];
			}
			
			
			if (isset($vals['price'])){
				
				$this->price = $vals['price'];
			}
			
			
			if (isset($vals['exActSubtotal'])){
				
				$this->exActSubtotal = $vals['exActSubtotal'];
			}
			
			
			if (isset($vals['exCouponSubTotal'])){
				
				$this->exCouponSubTotal = $vals['exCouponSubTotal'];
			}
			
			
			if (isset($vals['goodsName'])){
				
				$this->goodsName = $vals['goodsName'];
			}
			
			
			if (isset($vals['sizeCommissionTotal'])){
				
				$this->sizeCommissionTotal = $vals['sizeCommissionTotal'];
			}
			
			
			if (isset($vals['commissionStatus'])){
				
				$this->commissionStatus = $vals['commissionStatus'];
			}
			
			
			if (isset($vals['sellPrice'])){
				
				$this->sellPrice = $vals['sellPrice'];
			}
			
			
			if (isset($vals['taxCode'])){
				
				$this->taxCode = $vals['taxCode'];
			}
			
			
			if (isset($vals['taxRate'])){
				
				$this->taxRate = $vals['taxRate'];
			}
			
			
			if (isset($vals['sizeRefundCommissionTotal'])){
				
				$this->sizeRefundCommissionTotal = $vals['sizeRefundCommissionTotal'];
			}
			
			
			if (isset($vals['sizeRefundCommissionTime'])){
				
				$this->sizeRefundCommissionTime = $vals['sizeRefundCommissionTime'];
			}
			
			
			if (isset($vals['sizeRewardTotalMoney'])){
				
				$this->sizeRewardTotalMoney = $vals['sizeRewardTotalMoney'];
			}
			
			
			if (isset($vals['sizeName'])){
				
				$this->sizeName = $vals['sizeName'];
			}
			
			
			if (isset($vals['color'])){
				
				$this->color = $vals['color'];
			}
			
			
		}
		
	}
	
	
	public function getName(){
		
		return 'WpcVopOrderGoodsVo';
	}
	
	public function read($input){
		
		$input->readStructBegin();
		while(true){
			
			$schemeField = $input->readFieldBegin();
			if ($schemeField == null) break;
			$needSkip = true;
			
			
			if ("goodFullId" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->goodFullId);
				
			}
			
			
			
			
			if ("sizeId" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->sizeId);
				
			}
			
			
			
			
			if ("sizeNum" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->sizeNum); 
				
			}
			
			
			
			
			if ("price" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->price);
				
			}
			
			
			
			
			if ("exActSubtotal" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->exActSubtotal);
				
			}
			
			
			
			
			if ("exCouponSubTotal" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->exCouponSubTotal);
				
			}
			
			
			
			
			if ("goodsName" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->goodsName);
				
			}
			
			
			
			
			if ("sizeCommissionTotal" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->sizeCommissionTotal);
				
			}
			
			
			
			
			if ("commissionStatus" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->commissionStatus); 
				
			}
			
			
			
			
			if ("sellPrice" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->sellPrice);
				
			}
			
			
			
			
			if ("taxCode" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->taxCode);
				
			}
			
			
			
			
			if ("taxRate" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->taxRate);
				
			}
			
			
			
			
			if ("sizeRefundCommissionTotal" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->sizeRefundCommissionTotal);
				
			}
			
			
			
			
			if ("sizeRefundCommissionTime" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->sizeRefundCommissionTime);
				
			}
			
			
			
			
			if ("sizeRewardTotalMoney" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->sizeRewardTotalMoney);
				
			}
			
			
			
			
			if ("sizeName" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->sizeName);
				
			}
			
			
			
			
			if ("color" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->color);
				
			}
			
			
			
			if($needSkip){
				
				\Osp\Protocol\ProtocolUtil::skip($input);
			}
			
			$input->readFieldEnd();
		}
		
		$input->readStructEnd();
		
		
		
	}
	
	public function write($output){
		
		$xfer = 0;
		$xfer += $output->writeStructBegin();
		
		if($this->goodFullId !== null) {
			
			$xfer += $output->writeFieldBegin('goodFullId');
			$xfer += $output->writeString($this->goodFullId);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->sizeId !== null) {
			
			$xfer += $output->writeFieldBegin('sizeId');
			$xfer += $output->writeString($this->sizeId);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->sizeNum !== null) {
			
			$xfer += $output->writeFieldBegin('sizeNum');
			$xfer += $output->writeI32($this->sizeNum);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->price !== null) {
			
			$xfer += $output->writeFieldBegin('price');
			$xfer += $output->writeString($this->price);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->exActSubtotal !== null) {
			
			$xfer += $output->writeFieldBegin('exActSubtotal');
			$xfer += $output->writeString($this->exActSubtotal);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->exCouponSubTotal !== null) {
			
			$xfer += $output->writeFieldBegin('exCouponSubTotal');
			$xfer += $output->writeString($this->exCouponSubTotal);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->goodsName !== null) {
			
			$xfer += $output->writeFieldBegin('goodsName');
			$xfer += $output->writeString($this->goodsName);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->sizeCommissionTotal !== null) {
			
			$xfer += $output->writeFieldBegin('sizeCommissionTotal');
			$xfer += $output->writeString($this->sizeCommissionTotal);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->commissionStatus !== null) {
			
			$xfer += $output->writeFieldBegin('commissionStatus');
			$xfer += $output->writeI32($this->commissionStatus);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->sellPrice !== null) {
			
			$xfer += $output->writeFieldBegin('sellPrice');
			$xfer += $output->writeString($this->sellPrice);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->taxCode !== null) {
			
			$xfer += $output->writeFieldBegin('taxCode');
			$xfer += $output->writeString($this->taxCode);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->taxRate !== null) {
			
			$xfer += $output->writeFieldBegin('taxRate');
			$xfer += $output->writeString($this->taxRate);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->sizeRefundCommissionTotal !== null) {
			
			$xfer += $output->writeFieldBegin('sizeRefundCommissionTotal');
			$xfer += $output->writeString($this->sizeRefundCommissionTotal);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->sizeRefundCommissionTime !== null) {
			
			$xfer += $output->writeFieldBegin('sizeRefundCommissionTime');
			$xfer += $output->writeString($this->sizeRefundCommissionTime);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->sizeRewardTotalMoney !== null) {
			
			$xfer += $output->writeFieldBegin('sizeRewardTotalMoney');
			$xfer += $output->writeString($this->sizeRewardTotalMoney);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->sizeName !== null) {
			
			$xfer += $output->writeFieldBegin('sizeName');
			$xfer += $output->writeString($this->sizeName);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->color !== null) {
			
			$xfer += $output->writeFieldBegin('color');
			$xfer += $output->writeString($this->color);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		$xfer += $output->writeFieldStop();
		$xfer += $output->writeStructEnd();
		return $xfer;
	}
	
}

?>